package com.luo.dt.seata.tcc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.luo.dt.seata.tcc.model.entity.Storage;
import org.apache.ibatis.annotations.Param;

/**
 * 库存信息 Mapper 接口
 *
 * @author luohq
 * @date 2021-11-02
 */
public interface StorageMapper extends BaseMapper<Storage> {

    /**
     * 扣减商品库存
     *
     * @param commodityCode 商品编码
     * @param count         扣减数量
     * @return 返回结果
     */
    Integer deductStorage(@Param("commodityCode") String commodityCode, @Param("count") Integer count);
}
